{extend name="layout"}
{block name="style"}
<style>
body{min-width: inherit;background-color: #fff;overflow-x: hidden;}
.teacher{display: none;}
.layui-layout-admin .layui-body{top:10px;}
form{padding:50px 0;}
.layui-footer{width: 100%;position: fixed;bottom: 0;padding:10px 0px;background-color: #eee;text-align: center;}
</style>
{/block}
{block name="header"}{/block}
{block name="menu"}{/block}
{block name="more"}{/block}
{block name="footer"}

{/block}
{block name="main"}
<form class="layui-form" action="" method="post">
 
  
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">姓名</label>
      <div class="layui-input-inline">
        <input type="text" name="name" value='{$data.name}' placeholder="" required lay-verify="name" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
    
    <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">手机</label>
      <div class="layui-input-inline">
        <input type="text" name="mobile" value='{$data.mobile}' placeholder="" required lay-verify="phone" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>



  <div class="layui-form-item">
    <div class="layui-block">
      <label class="layui-form-label">内容</label>
      <div class="layui-input-block" style="padding-right:20px;">
        <textarea type="text" name="content" placeholder="" required lay-verify="content" class="layui-textarea">{$data.content}</textarea>
      </div>
    </div>
  </div>

    
    
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">回复状态</label>
      <div class="layui-input-inline">
        <select name="status" lay-filter="">
          <option value="0" {eq name='data.status' value='0'}selected{/eq}>未回复</option>
          <option value="1"  {eq name='data.status' value='1'}selected{/eq}>已回复</option>
        </select>
      </div>
    </div>
  </div>

  <div class="layui-footer">
    <button class="layui-btn layui-btn-normal layui-btn-small" lay-submit lay-filter="*" type="button">立即提交</button>
    <button class="layui-btn layui-btn-small layui-btn-primary" id="closeFrame" type="button">完成/取消</button>
  </div>

</form>
<script>
  layui.use(['layer','jquery','form'],function(){
    var $ = layui.jquery;
    var form = layui.form;
    var layedit = layui.layedit;

   


    form.verify({
      name:function(value){if(value.length < 1){return '姓名不能为空';}},
        content:function(value){if(value.length < 1){return '内容不能为空';}}
    });

    //监听提交
    form.on('submit(*)', function(data){
      data.form.submit();
      return true;
    });
    $('#closeFrame').on('click',function(){
      parent.layer.closeAll();
    })
    $('#addData').on('click',function(){
      $('form').submit();
    })
  });
</script>
{/block}
{block name="script"}
{/block}
